#pragma once

#include <list>
#include <map>
#include <unordered_map>
#include <vector>

using std::list;
using std::unordered_map;
using std::pair;
using std::vector;

template<class T1, class T2>
class LRUCache
{
public:
    LRUCache(int capacity);

    T2 get(T1 key);

    void put(T1 key, T2 value);

    vector<pair<T1, T2>> getAll();

private:
    int m_capacity;
    list<pair<T1, T2>> m_lst;
    unordered_map<T1, typename list<pair<T1, T2>>::iterator> m_ump;
};

#include "../../src/Reactor/LRUCache.cpp"